package com.cn.yz.client.config.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Spring Cloud Bus的更新只对三种情况有效

    @ConfigurationProperties

    @RefreshScope

    日志级别

 * @author king
 *
 */
@RestController
@RefreshScope//可刷新标记
//@ConfigurationProperties(prefix = "database.source")
public class MainController {

	@Value("${database.source}")
    String foo;
    @RequestMapping(value = "/hi")
    public String hi(){
        return foo;
    }

}
